<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加角色</title>
</head>
<body>

<form class="layui-form" lay-filter="layui-form">
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="role_id"
                             data-sourceType="route"
                             data-source="/admin.yys.role/index"
                             data-textField="name"
                             data-valueField="id"
                             data-paging="true"
                             data-radio="true"
                             data-layVerify="required"
                             data-direction="down"
                        ></div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">属性加成2</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="main_attr1"
                             data-sourceType="data"
                             data-radio="true"
                             data-source="[{'name':'攻击加成','value':'攻击加成'},{'name':'暴击伤害','value':'暴击伤害'},{'name':'生命加成','value':'生命加成'},{'name':'速度','value':'速度'},{'name':'速度加成','value':'速度加成'},{'name':'效果命中','value':'效果命中'},{'name':'','value':''},{'name':'防御加成','value':'防御加成'},{'name':'暴击\/暴击伤害','value':'暴击\/暴击伤害'},{'name':'生命','value':'生命'},{'name':'抵抗','value':'抵抗'},{'name':'任意','value':'任意'},{'name':'效果抵抗','value':'效果抵抗'},{'name':'命中效果','value':'命中效果'},{'name':'攻击加成\/生命加成','value':'攻击加成\/生命加成'},{'name':'暴击','value':'暴击'},{'name':'攻击加成\/生命加成\/效果命中','value':'攻击加成\/生命加成\/效果命中'},{'name':'速度\/攻击加成','value':'速度\/攻击加成'},{'name':'暴击\/暴击伤害\/攻击加成','value':'暴击\/暴击伤害\/攻击加成'},{'name':'抵抗加成','value':'抵抗加成'},{'name':'攻击加成\/速度','value':'攻击加成\/速度'},{'name':'暴击\/攻击加成','value':'暴击\/攻击加成'},{'name':'攻击加成\/效果命中','value':'攻击加成\/效果命中'},{'name':'暴击\/暴伤','value':'暴击\/暴伤'},{'name':'防御\/暴击','value':'防御\/暴击'},{'name':'攻击加成\/暴击','value':'攻击加成\/暴击'},{'name':'暴击加成','value':'暴击加成'},{'name':'暴伤','value':'暴伤'},{'name':'暴击\/攻击','value':'暴击\/攻击'},{'name':'抵抗\/生命','value':'抵抗\/生命'},{'name':'暴击\/生命加成','value':'暴击\/生命加成'},{'name':'攻击\/生命','value':'攻击\/生命'},{'name':'攻击','value':'攻击'},{'name':'生命\/暴击','value':'生命\/暴击'},{'name':'攻击\/生命加成','value':'攻击\/生命加成'},{'name':'暴伤\/暴击','value':'暴伤\/暴击'},{'name':'攻击\/抵抗','value':'攻击\/抵抗'},{'name':'速度\/生命','value':'速度\/生命'},{'name':'爆伤','value':'爆伤'},{'name':'生命\/效果抵抗','value':'生命\/效果抵抗'},{'name':'攻击百分比','value':'攻击百分比'},{'name':'命中','value':'命中'}]"
                        ></div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">属性加成4</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="main_attr2"
                             data-sourceType="data"
                             data-radio="true"
                             data-source="[{'name':'攻击加成','value':'攻击加成'},{'name':'暴击伤害','value':'暴击伤害'},{'name':'生命加成','value':'生命加成'},{'name':'速度','value':'速度'},{'name':'速度加成','value':'速度加成'},{'name':'效果命中','value':'效果命中'},{'name':'','value':''},{'name':'防御加成','value':'防御加成'},{'name':'暴击\/暴击伤害','value':'暴击\/暴击伤害'},{'name':'生命','value':'生命'},{'name':'抵抗','value':'抵抗'},{'name':'任意','value':'任意'},{'name':'效果抵抗','value':'效果抵抗'},{'name':'命中效果','value':'命中效果'},{'name':'攻击加成\/生命加成','value':'攻击加成\/生命加成'},{'name':'暴击','value':'暴击'},{'name':'攻击加成\/生命加成\/效果命中','value':'攻击加成\/生命加成\/效果命中'},{'name':'速度\/攻击加成','value':'速度\/攻击加成'},{'name':'暴击\/暴击伤害\/攻击加成','value':'暴击\/暴击伤害\/攻击加成'},{'name':'抵抗加成','value':'抵抗加成'},{'name':'攻击加成\/速度','value':'攻击加成\/速度'},{'name':'暴击\/攻击加成','value':'暴击\/攻击加成'},{'name':'攻击加成\/效果命中','value':'攻击加成\/效果命中'},{'name':'暴击\/暴伤','value':'暴击\/暴伤'},{'name':'防御\/暴击','value':'防御\/暴击'},{'name':'攻击加成\/暴击','value':'攻击加成\/暴击'},{'name':'暴击加成','value':'暴击加成'},{'name':'暴伤','value':'暴伤'},{'name':'暴击\/攻击','value':'暴击\/攻击'},{'name':'抵抗\/生命','value':'抵抗\/生命'},{'name':'暴击\/生命加成','value':'暴击\/生命加成'},{'name':'攻击\/生命','value':'攻击\/生命'},{'name':'攻击','value':'攻击'},{'name':'生命\/暴击','value':'生命\/暴击'},{'name':'攻击\/生命加成','value':'攻击\/生命加成'},{'name':'暴伤\/暴击','value':'暴伤\/暴击'},{'name':'攻击\/抵抗','value':'攻击\/抵抗'},{'name':'速度\/生命','value':'速度\/生命'},{'name':'爆伤','value':'爆伤'},{'name':'生命\/效果抵抗','value':'生命\/效果抵抗'},{'name':'攻击百分比','value':'攻击百分比'},{'name':'命中','value':'命中'}]"
                        ></div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">属性加成6</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="main_attr3"
                             data-sourceType="data"
                             data-radio="true"
                             data-source="[{'name':'攻击加成','value':'攻击加成'},{'name':'暴击伤害','value':'暴击伤害'},{'name':'生命加成','value':'生命加成'},{'name':'速度','value':'速度'},{'name':'速度加成','value':'速度加成'},{'name':'效果命中','value':'效果命中'},{'name':'','value':''},{'name':'防御加成','value':'防御加成'},{'name':'暴击\/暴击伤害','value':'暴击\/暴击伤害'},{'name':'生命','value':'生命'},{'name':'抵抗','value':'抵抗'},{'name':'任意','value':'任意'},{'name':'效果抵抗','value':'效果抵抗'},{'name':'命中效果','value':'命中效果'},{'name':'攻击加成\/生命加成','value':'攻击加成\/生命加成'},{'name':'暴击','value':'暴击'},{'name':'攻击加成\/生命加成\/效果命中','value':'攻击加成\/生命加成\/效果命中'},{'name':'速度\/攻击加成','value':'速度\/攻击加成'},{'name':'暴击\/暴击伤害\/攻击加成','value':'暴击\/暴击伤害\/攻击加成'},{'name':'抵抗加成','value':'抵抗加成'},{'name':'攻击加成\/速度','value':'攻击加成\/速度'},{'name':'暴击\/攻击加成','value':'暴击\/攻击加成'},{'name':'攻击加成\/效果命中','value':'攻击加成\/效果命中'},{'name':'暴击\/暴伤','value':'暴击\/暴伤'},{'name':'防御\/暴击','value':'防御\/暴击'},{'name':'攻击加成\/暴击','value':'攻击加成\/暴击'},{'name':'暴击加成','value':'暴击加成'},{'name':'暴伤','value':'暴伤'},{'name':'暴击\/攻击','value':'暴击\/攻击'},{'name':'抵抗\/生命','value':'抵抗\/生命'},{'name':'暴击\/生命加成','value':'暴击\/生命加成'},{'name':'攻击\/生命','value':'攻击\/生命'},{'name':'攻击','value':'攻击'},{'name':'生命\/暴击','value':'生命\/暴击'},{'name':'攻击\/生命加成','value':'攻击\/生命加成'},{'name':'暴伤\/暴击','value':'暴伤\/暴击'},{'name':'攻击\/抵抗','value':'攻击\/抵抗'},{'name':'速度\/生命','value':'速度\/生命'},{'name':'爆伤','value':'爆伤'},{'name':'生命\/效果抵抗','value':'生命\/效果抵抗'},{'name':'攻击百分比','value':'攻击百分比'},{'name':'命中','value':'命中'}]"
                        ></div>
                    </div>
                </div>


                <blockquote class="layui-elem-quote">御魂方案</blockquote>
                <div class="layui-form-item">
                    <label class="layui-form-label">御魂1</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="yh1"
                             data-sourceType="route"
                             data-source="/admin.yys.yh/material"
                             data-textField="name"
                             data-valueField="name"
                             data-paging="true"
                             data-radio="true"
                             data-layVerify="required"
                             data-direction="down"
                        ></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><text title="必填项" style="color:red;">*</text>御魂1数量</label>
                    <div class="layui-input-block">
                        <input type="number" name="yh1_num" lay-verify="required" autocomplete="off" placeholder="请输入数量" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">御魂2</label>
                    <div class="layui-input-block">
                        <div class="xmSelect"
                             data-name="yh2"
                             data-sourceType="route"
                             data-source="/admin.yys.yh/material"
                             data-textField="name"
                             data-valueField="name"
                             data-paging="true"
                             data-radio="true"
                             data-layVerify="required"
                             data-direction="down"
                        ></div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><text title="必填项" style="color:red;">*</text>御魂2数量</label>
                    <div class="layui-input-block">
                        <input type="number" name="yh2_num" lay-verify="required" autocomplete="off" placeholder="请输入数量" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label"><text title="必填项" style="color:red;">*</text>推荐理由</label>
                    <div class="layui-input-block">
                        <input type="text" name="recomm_reason" lay-verify="required" autocomplete="off" placeholder="请输入数量" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="submit" class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="add">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="laytp-btn laytp-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
    if(localStorage.getItem("staticDomain")){
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/jquery_3.3.1.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/jquery.tablednd.js?v="+localStorage.getItem("version")+"'><\/script>");
    }else{
        document.write("<link rel='stylesheet' href='/static/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/jquery_3.3.1.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/jquery.tablednd.js?v="+localStorage.getItem("version")+"'><\/script>");
    }
</script>
<script>
    layui.use(['laytp'],function(){
        layui.form.on('submit(add)', function(data){
            var btnAnim = layui.button.load({elem:$(this)});
            facade.ajax({
                route:'/admin.yys.yh/add',
                data : data.field
            }).done(function(res){
                if(res.code === 0){
                    parent.layui.layer.close(parent.layui.layer.getFrameIndex(window.name));//关闭当前页
                    parent.layui.table.reload("laytp-table");
                }
                btnAnim.stop();
            }).fail(function(){
                btnAnim.stop();
            });
            return false;
        });
    })
</script>
</body>
</html>